package com.lv.utils.FeignClient;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;

/**
 * @author: Lv_sc
 * Date:     2021/4/1 9:46
 * Description: 描述
 */
@Configuration
public class FeignConfig  implements RequestInterceptor {
    Logger logger = LoggerFactory.getLogger(FeignConfig.class);

    @Override
    public void apply(RequestTemplate requestTemplate) {
        boolean login = requestTemplate.method().equals("login");
        if(login){
            logger.info("当前登录接口为Login");
        }
        logger.info("当前登录接口为:{}",requestTemplate.method());
    }
}